import request from '@/api/utils/request';

/**
 *  检查记录列表
 *  @param {
 *         size: 10,
 *         current: 1,
 *          data: {
 *                dormitoryId: 11, //宿舍楼id
 *                roomName  :  "201", 房间名称
 *                startTime : "2020-22-05 15:55:30",//开始时间
 *                endTime : "2020-22-05 15:55:30",//结束时间
 *         }
 *      }
 */
export const getExamineRecording = data =>
  request({
    method: 'post',
    url: '/schExamine/getExamineRecording',
    data
  });

/**
 * 检查记录详情
 * @param { examineId : 考核id } data
 */
export const dormitoryDetails = data =>
  request({
    method: 'get',
    url: '/schExamine/getExamineRecordingDetails',
    params: data
  });

/**
 * 获取检查设置
 * @returns
 *     id:   设置id,
 *     deleteDayNum : 可删除天数
 *     resubmitDayNum  :   可重新提交天数
 */
export const getExamineSettingResubmit = () =>
  request({
    method: 'get',
    url: '/schExamineSetting/getExamineSetting'
  });
/**
 *添加或修改检查设置
 * @param {*
 *     id:   设置id,  //有id是修改,没有id是添加
 *     deleteDayNum : 可删除天数
 *     resubmitDayNum  :   可重新提交天数
 * }
 */
export const setUpdateMarkModel = data =>
  request({
    method: 'post',
    url: '/schExamineSetting/setUpdateMarkModel',
    data
  });
